<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组分隔</title>
    <script>
        var array = ["aa", "bb", "cc","dd","ee"];
        var str = array[0];
        var seperator = "|";
        for (var i = 1; i < array.length; i++) {
            str += seperator + array[i];
         }
         console.log(str)
    </script>
</head>
<body>
</body>
</html>